package org.example.test;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

import java.util.List;


/**
 * @Author : zhangbo
 * @data : 2024/11/28
 * @description :
 */
public class test1 {
    public static void main(String[] args) {
//        String json="{\"DhrTaskDetailsDto\":[{\"templateName\":\"ceshi\",\"zi_company\":\"子公司\",\" branch_company\":\"branch\",\" department\":\"研发部\",\" templateId\":\"\",\" branch\":\"TB00011\",\" taskCode\":\"1\",\" taskName\":\"ceshi\",\" taskContent\":\"ceshiTask\",\" taskSort\":\"1\",\" taskType\":\"1\",\" delStatus\":\"0\",\" taskPersonCode\":\"1991245\",\" taskPersonName\":\"zhangsan\",\" createAccount\":\"TB010101\",\" updateAccount\":\"\",\" updateTime\":\"\",\"materialList\":[{\"templateId\":\"\",\"createAccount\":\"01010\",\"createTime\":\"\",\"branch\":\"TB0011\",\"availableType\":\"1\",\"infoType\":\"1\",\"infoName\":\"1111\",\"fileId\":\"\",\"requireFlag\":\"1\",\"description\":\"测试\",\"updateAccount\":\"\",\"updateTime\":\"\",\"emplyNo\":\"011400\",\"smallType\":\"1\",\"valueType\":\"0\",\"url\":\"\"}]}]}";
//        String json1="{\\\\\\\"DhrTaskDetailsDto\\\\\\\":[{\\\\\\\"templateName\\\\\\\":\\\\\\\"ceshi\\\\\\\",\\\\\\\"zi_company\\\\\\\":\\\\\\\"子公司\\\\\\\",\\\\\\\" branch_company\\\\\\\":\\\\\\\"branch\\\\\\\",\\\\\\\" department\\\\\\\":\\\\\\\"研发部\\\\\\\",\\\\\\\" templateId\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\" branch\\\\\\\":\\\\\\\"TB00011\\\\\\\",\\\\\\\" taskCode\\\\\\\":\\\\\\\"1\\\\\\\",\\\\\\\" taskName\\\\\\\":\\\\\\\"ceshi\\\\\\\",\\\\\\\" taskContent\\\\\\\":\\\\\\\"ceshiTask\\\\\\\",\\\\\\\" taskSort\\\\\\\":\\\\\\\"1\\\\\\\",\\\\\\\" taskType\\\\\\\":\\\\\\\"1\\\\\\\",\\\\\\\" delStatus\\\\\\\":\\\\\\\"0\\\\\\\",\\\\\\\" taskPersonCode\\\\\\\":\\\\\\\"1991245\\\\\\\",\\\\\\\" taskPersonName\\\\\\\":\\\\\\\"zhangsan\\\\\\\",\\\\\\\" createAccount\\\\\\\":\\\\\\\"TB010101\\\\\\\",\\\\\\\" updateAccount\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\" updateTime\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"materialList\\\\\\\":[{\\\\\\\"templateId\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"createAccount\\\\\\\":\\\\\\\"01010\\\\\\\",\\\\\\\"createTime\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"branch\\\\\\\":\\\\\\\"TB0011\\\\\\\",\\\\\\\"availableType\\\\\\\":\\\\\\\"1\\\\\\\",\\\\\\\"infoType\\\\\\\":\\\\\\\"1\\\\\\\",\\\\\\\"infoName\\\\\\\":\\\\\\\"1111\\\\\\\",\\\\\\\"fileId\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"requireFlag\\\\\\\":\\\\\\\"1\\\\\\\",\\\\\\\"description\\\\\\\":\\\\\\\"测试\\\\\\\",\\\\\\\"updateAccount\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"updateTime\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"emplyNo\\\\\\\":\\\\\\\"011400\\\\\\\",\\\\\\\"smallType\\\\\\\":\\\\\\\"1\\\\\\\",\\\\\\\"valueType\\\\\\\":\\\\\\\"0\\\\\\\",\\\\\\\"url\\\\\\\":\\\\\\\"\\\\\\\"}]}]}";
//        String json3="{\n" +
//                "\"templateId\":\"\",\n" +
//                "\"templateName\":\"新增模板111712\",\n" +
//                "\"isAdaptAllOrg\":\"1\",\n" +
//                "\"templateType\":\"0\",\n" +
//                "\"isHeadquarter\":\"\",\n" +
//                "\"branch\":\"TB100675155\",\n" +
//                "\"branchName\":\"新增模板名称111\",\n" +
//                "\"branchType\":\"3\",\n" +
//                "\"templateState\":\"1\",\n" +
//                "\"createPerson\":\"\",\n" +
//                "\"updatePerson\":\"\",\n" +
//                "\"createTime\":\"\",\n" +
//                "\"updateTime\":\"\",\n" +
//                "\"departmentCode\":\"TB102100777\",\n" +
//                "\"operateType\":\"1\",\n" +
//                "\"loginPsId\":\"10236985\",\n" +
//                "\"totalData\": \"[{\\\"DhrTaskDetailsDto\\\":[{\\\"templateName\\\":\\\"ceshi\\\",\\\"zi_company\\\":\\\"子公司\\\",\\\" branch_company\\\":\\\"branch\\\",\\\" department\\\":\\\"研发部\\\",\\\" templateId\\\":\\\"\\\",\\\" branch\\\":\\\"TB00011\\\",\\\" taskCode\\\":\\\"1\\\",\\\" taskName\\\":\\\"ceshi\\\",\\\" taskContent\\\":\\\"ceshiTask\\\",\\\" taskSort\\\":\\\"1\\\",\\\" taskType\\\":\\\"1\\\",\\\" delStatus\\\":\\\"0\\\",\\\" taskPersonCode\\\":\\\"1991245\\\",\\\" taskPersonName\\\":\\\"zhangsan\\\",\\\" createAccount\\\":\\\"TB010101\\\",\\\" updateAccount\\\":\\\"\\\",\\\" updateTime\\\":\\\"\\\",\\\"materialList\\\":[{\\\"templateId\\\":\\\"\\\",\\\"createAccount\\\":\\\"01010\\\",\\\"createTime\\\":\\\"\\\",\\\"branch\\\":\\\"TB0011\\\",\\\"availableType\\\":\\\"1\\\",\\\"infoType\\\":\\\"1\\\",\\\"infoName\\\":\\\"1111\\\",\\\"fileId\\\":\\\"\\\",\\\"requireFlag\\\":\\\"1\\\",\\\"description\\\":\\\"测试\\\",\\\"updateAccount\\\":\\\"\\\",\\\"updateTime\\\":\\\"\\\",\\\"emplyNo\\\":\\\"011400\\\",\\\"smallType\\\":\\\"1\\\",\\\"valueType\\\":\\\"0\\\",\\\"url\\\":\\\"\\\"}]}]}]\"\n" +
//                "}";
//
//
////        VersionConfigDto dto = JSON.parseObject(json3, VersionConfigDto.class);
////        List<UploadMaterialDto> totalData1 = dto.getTotalData();
//        Object parse = JSON.parse(json3);
//        if (parse instanceof JSONObject) {
//            JSONObject jsonObject = (JSONObject) parse;
//            // 获取字符串值
//            JSONArray totalData = JSONObject.parseArray(jsonObject.getString("totalData"));
//            JSONObject totalDatas= totalData.getJSONObject(0);
//            DhrTaskDetailsDto dhrTaskDetailsDto = totalDatas.getJSONArray("DhrTaskDetailsDto").getJSONObject(0).toJavaObject(DhrTaskDetailsDto.class);
//            List<UploadMaterialDto> materialList = dhrTaskDetailsDto.getMaterialList();
//            System.out.println(dhrTaskDetailsDto);
//        }
       String name="张";
        String regex = "[\u4e00-\u9fa5]";
        String ss = name;
        int length = ss.replaceAll(regex, "12").length();
        int length1 = ss.length();
        System.out.println(length -length1 );


    }
}
